import { _decorator, Component, Node } from 'cc';
import {GameMain} from "./GameMain";
import Platform from './Platform';
const { ccclass, property } = _decorator;

@ccclass('ConfirmDlgUI')
export class ConfirmDlgUI extends Component
{
    start()
    {
        Platform.createInsertAd();
    }

    public show()
    {
        if(this.node.active)
            return;

        this.node.active=true;
    }

    public close()
    {
        this.node.active=false;
    }

    public onClearDataBtnClicked()
    {
        GameMain.instance.clearGameData();
        this.close();
    }

    update(deltaTime: number)
    {
        
    }
}

